﻿<UserControl xmlns:my="clr-namespace:IsoStoreSpy.Plugins.Shared.Controls;assembly=IsoStoreSpy.Plugins.Shared"  x:Class="IsoStoreSpy.Plugins.Controls.PreviewTextControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Margin="5">

        <Grid.Resources>
            <Style x:Key="TitleForm" TargetType="TextBlock">
                <Setter Property="Margin" Value="5,5,5,5"></Setter>
                <Setter Property="FontSize" Value="20"></Setter>
                <Setter Property="Foreground" Value="DarkGray"></Setter>
                <Setter Property="Opacity" Value="0.75"></Setter>
            </Style>

        </Grid.Resources>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>

        <DockPanel Grid.Row="0" Margin="0,5,10,10" >

            <TextBlock DockPanel.Dock="Left" Text="Text file" Style="{StaticResource TitleForm}"></TextBlock>
            <my:MetroButton HorizontalAlignment="Right" DockPanel.Dock="Right" IconSource="/IsoStoreSpy.Plugins;component/Images/Save.png" Content="Save" ToolTip="Save change in the text on the phone" Margin="5,0,10,0" Click="SaveButton_Click" />
        </DockPanel>

        <TextBox Grid.Row="1" AcceptsReturn="True" AcceptsTab="True" TextWrapping="Wrap" Margin="5,0,5,5" BorderBrush="LightGray" BorderThickness="1" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Text="{Binding Text}" />
    </Grid>
</UserControl>
